package com.horse.pack.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author yangliu
 * @date 2024/3/22 11:38 AM
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaseResponse {

    private int code;
    private String message;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public boolean isSuccess() {
        return code == 0;
    }

    public BaseResponse(int code) {
        this.code = code;
    }

}
